chore: propagate blas/base/ndarray/* modernization fixes to sibling packages#11742
Merged
chore: propagate blas/base/ndarray/* modernization fixes to sibling packages#11742
blas/base/ndarray/* modernization fixes to sibling packages#11742Conversation
Propagates fix from 1f18356 ("chore: modernize examples and benchmarks") to the complex and swap sibling packages whose README examples still wrote the output-ndarray identity check as `( y === z )` instead of the canonical `( z === y )` form used across modernized siblings (daxpy, saxpy, dcopy, scopy, ...).
Propagates modernization from 1f18356 ("chore: modernize examples and benchmarks") to the axpy tests that still imported `scalar2ndarray` from the deprecated `@stdlib/ndarray/base/from-scalar` path and called it with positional arguments. Each package's `lib/main.js` already uses the modern `@stdlib/ndarray/from-scalar` with the options-object form; the tests are brought in line with them.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
reviewed
Apr 23, 2026
Member
There was a problem hiding this comment.
This change is not necessarily needed and was originally omitted on purpose as tests are a bit trickier to uniformly align, especially as we intentionally need lower level interfaces (e.g., for stride and offset manipulation). This change is harmless, however, so I will accept it and similar changes in this PR.
kgryte
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Propagating fixes merged to
developbetween 2026-04-22 17:30 PDT and 2026-04-23 03:05 PDT to sibling packages.Description
This pull request:
chore: modernize examples and benchmarksseries (16 commits on 2026-04-22/23, representative SHA1f183560) and thechore: follow-up fixescommit (40db61db) to the sibling packages the source commits did not reach.blas/base/ndarray/*README identity-check form (eb98b400)Propagates the
( z === y )identity-check form introduced in1f183560to the five remaining output-ndarray README examples that still use thevar bool = ( y === z );pattern. Affected packages:blas/base/ndarray/caxpy,blas/base/ndarray/zaxpy,blas/base/ndarray/ccopy,blas/base/ndarray/zcopy, andblas/base/ndarray/dswap. Purely mechanical one-line edits with no behavioral changes.lib/node_modules/@stdlib/blas/base/ndarray/caxpy/README.mdlib/node_modules/@stdlib/blas/base/ndarray/zaxpy/README.mdlib/node_modules/@stdlib/blas/base/ndarray/ccopy/README.mdlib/node_modules/@stdlib/blas/base/ndarray/zcopy/README.mdlib/node_modules/@stdlib/blas/base/ndarray/dswap/README.mdblas/base/ndarray/*axpyscalar2ndarraytest modernization (03235e5c)Propagates the modernization from commit
1f183560to thetest/test.jsfiles missed in the original series:blas/base/ndarray/{daxpy,saxpy,caxpy,zaxpy,gaxpy}/test/test.js. Each file is updated to importscalar2ndarrayfromndarray/from-scalar(top-level) instead of the deprecatedndarray/base/from-scalar, and to call it with the options-object formscalar2ndarray( val, { 'dtype': '...' } )matching the dtype used by the respective package. Behavior is preserved becausendarray/from-scalardefaults torow-majororder andalphais consumed as an ndarray throughout.lib/node_modules/@stdlib/blas/base/ndarray/daxpy/test/test.js(float64)lib/node_modules/@stdlib/blas/base/ndarray/saxpy/test/test.js(float32)lib/node_modules/@stdlib/blas/base/ndarray/caxpy/test/test.js(complex64)lib/node_modules/@stdlib/blas/base/ndarray/zaxpy/test/test.js(complex128)lib/node_modules/@stdlib/blas/base/ndarray/gaxpy/test/test.js(generic)Related Issues
No.
Questions
No.
Other
Validation
blas/base/ndarray/*siblings under the source commits' namespace; no wider sweep.needs-humanflags.package.jsonupdates required (the modernized module is already transitively present via each package'sexamples/index.jsandbenchmark/benchmark.js).{\n\t\t'dtype': '...'\n\t}) against modernized sibling tests (blas/ext/base/ndarray/dsort,dsortins,dsorthp) and confirmed the README( z === y )wording matchesscopy,dcopy,daxpy,saxpy.node --check) passed on all five modernized test files.Deliberately excluded
@stdlib/ndarray/vector/<dtype>instead of@stdlib/ndarray/base/ctor" pattern (1,250+ hits repo-wide, 5,700+ hits for the companion@stdlib/random/array/*pattern). These are adaptive transformations whose per-site tailoring (complex vs. float buffers, REPL alias rewrites, docs type signatures) is outside the "direct analog, self-contained" bar for this run./* eslint-disable space-in-parens */directive removed by40db61db: cosmetic-only, not user-visible, excluded per the HIGH-SIGNAL filter.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of an automated fix-propagation routine. Source-commit pattern extraction, candidate-site enumeration, independent validation, and style-consistency review were all run as sub-agent passes; every proposed patch was cross-verified by two independent opus agents before being applied. A human maintainer will audit before promotion out of draft.
Generated by Claude Code